package com.yeming.flink.mudlog

/**
 * 定义了一个日志bean类，对应一个录井采集数据表。
 */
class RealLogBean extends Serializable {
  var id:String = _ // 日志md5
  var logType:String = _ //日志类型
  var wellId:String =_ //井id
  var happenTime:Long = _ //录井数据事件发生时间
  var logTime:Long = _ //录井数据采集时间
  var depth:Float =_ //井深数据
  var perm:Float =_ //渗透率数据
  var gamma:Float =_ //gamma数据
  var porosity:Float = _//孔隙度数据
  var fluvialFacies:Float = _//河流相沉积环境数据
  var netGross:Float = _//有效钻遇率


  //定义构造器方法
  def this(id:String,logType:String, wellId:String, happenTime:Long,logTime:Long, depth:Float, perm: Float, gamma:Float, porosity:Float, fluvialFacies: Float, netGross:Float) {
    this
    this.id = id
    this.logType = logType
    this.wellId = wellId
    this.happenTime = happenTime
    this.logTime = logTime
    this.depth = depth
    this.perm = perm
    this.gamma = gamma
    this.porosity= porosity
    this.fluvialFacies = fluvialFacies
    this.netGross = netGross
  }

  //重新bean类型的toString，方便日志的输出
  override def toString: String = {
    s"${id},${logType},${wellId},${happenTime},${logTime},${depth},${perm},${gamma},${porosity},${fluvialFacies},${netGross}"
  }

}
